package week2;
import java.util.Scanner;
public class ScoreCalculate {
    public static void main(String[]args){
        Scanner scanner =new Scanner(System.in);
        System.out.print("请输入java成绩：");
        int javaScore=scanner.nextInt();
        System.out.print("请输入数据库成绩：");
        int dbScore=scanner.nextInt();
        System.out.print("请输入C语言成绩：");
        int cScore=scanner.nextInt();
        int scoreDiff=javaScore-cScore;
        double average=(javaScore+dbScore+cScore)/3.0;
        System.out.println("Java和C语言的分数差："+scoreDiff);
        System.out.println("三门课程平均分："+average);
        scanner.close();
    }
}
